-- GENERATED SPELL FOR [Dragonmaw Bonewarder] --


function spell0_1057(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(6205,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1057', 613, 1)
end

function spell1_1057(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(707,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1057', 17000, 1)
end

function spell2_1057(pUnit, Event) --@Summon Skeleton,Self--
pUnit:FullCastSpellOnTarget(8853,pUnit)
pUnit:RegisterEvent('Sorts_1057', 626, 1)
end

function Sorts_1057(pUnit, Event)
local choix_sorts_1057 = math.random(0, 2)
if choix_sorts_1057 == 0 then
pUnit:RegisterEvent('spell0_1057', 1, 1)
end
if choix_sorts_1057 == 1 then
pUnit:RegisterEvent('spell1_1057', 1, 1)
end
if choix_sorts_1057 == 2 then
pUnit:RegisterEvent('spell2_1057', 1, 1)
end
end

function mob1057_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1057', math.random(1500, 3000), 1)
end

function mob1057_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1057_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1057_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1057, 1, 'mob1057_Action')
RegisterUnitEvent(1057, 2, 'mob1057_Leave')
RegisterUnitEvent(1057, 3, 'mob1057_Kill')
RegisterUnitEvent(1057, 4, 'mob1057_Die')
